import React from "react";
import { useTheme } from "./ThemeContext";
import { Button } from "@/components/ui/button";

const ThemedButton: React.FC = () => {
  const { theme, toggleTheme } = useTheme();

  return (
    <Button
      onClick={toggleTheme}
      className={`${
        theme === "dark" ? "bg-gray-800 text-white" : "bg-gray-200 text-black"
      }`}
    >
      切换主题 (当前: {theme})
    </Button>
  );
};

export default ThemedButton;
